<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>付款方式列表</title>
    <!--{include file='comm/icheck.tpl'}-->
    <!--{include file='comm/comm_editor.tpl'}-->
</head>
<body>

<div class="container">


    <div class="comm_crub">
        <span class="now_crub">付款方式列表</span>
        <button type="button" class="btn btn-primary" style="float: right;margin:6px 15px 0px 0px;" onclick="history.go(-1)">返回上一级</button>
    </div>

    <div class="comm_content">

        <table id="flex" style="display: none"></table>

    </div>



<!-- 新增、修改 -->
<div id="pop1" style="display: none;">

    <form class="form-horizontal" id="pay_add_form" onsubmit="return false;">

        <div class="form-group">
            <label for="name" class="col-sm-3 control-label"><span class="red">*</span> 付款方式名称：</label>
            <div class="col-sm-9">
                <input type="text" class="form-control w300" id="name" name="name" placeholder="请输入付款方式名称" />
                <input type="hidden" id="id" name="id" value="0" />
                <input type="hidden" id="payTypeID" name="payTypeID" value="<!--{$payTypeID}-->" />
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label"> 付款方式logo：</label>
            <div class="col-sm-9">
                <button type="button" class="btn btn-default" id="update_logo">点击上传logo</button>
                <div id="logo_img_box" style="display: none;margin-top: 5px;"></div>
                <input type="hidden" name="logo_img" id="logo_img" value="" />
            </div>
        </div>

        <div class="form-group">
            <label for="type" class="col-sm-3 control-label"><span class="red">*</span> 付款方式类型：</label>
            <div class="col-sm-9">
                <select class="form-control w150" id="type" name="type">
                    <option value="0">请选择</option>
                    <option value="1">现金</option>
                    <option value="2">刷卡</option>
                    <option value="3">信用卡</option>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="is_invoice-1" class="col-sm-3 control-label"><span class="red">*</span> 是否可开发票：</label>
            <div class="col-sm-9">
                <div class="fl" style="margin-right: 10px;">
                    <input type="radio" class="square-radio" id="is_invoice-1" name="is_invoice" value="1" checked>
                    <label for="is_invoice-1">是</label>
                </div>
                <div class="fl">
                    <input type="radio" class="square-radio" id="is_invoice-0" name="is_invoice" value="0">
                    <label for="is_invoice-0">否</label>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="memo" class="col-sm-3 control-label"> 描述：</label>
            <div class="col-sm-9">
                <textarea class="form-control w300" id="memo" name="memo" placeholder="请输入描述"></textarea>
            </div>
        </div>

    </form>

</div>



</div>

<script type="text/javascript">

    $(window).ready(function() {

        $(document).on('change', '#type', function() {

            if ($(this).val() == 2) {
                $('#platform').removeClass('hide');
            } else {
                $('#platform').addClass('hide');
            }

        });

    });

    $("#flex").flexigrid({
        url:"/invokingAjax-backend/system/payType.ajax?operFlg=5&payTypeID=" +<!--{$payTypeID}-->,
        dataType: "json",
        colModel : [
            {display: "操作", width : 120, align: 'center'},
            {display: "支付方式ID", name : "id" , width : 80 , sortable : true },
            {display: "付款方式名称", width : 100},
            {display: "付款类型", width : 100},
            {display: "是否可开发票", width : 100},
        ],

        buttons : [
            {name: "添加", bclass: "add", onpress : "pays.edit.open"},
            {separator: true},
            {name: "删除", bclass: "delete", onpress : "pays.del.check"},
            {separator: true},
            {name: "全选", bclass: "checkAll", onpress : "E.checkAllList"},
            {separator: true},
            {name: "取消全选", bclass: "cancelCheckAll", onpress : "E.cancelCheckAllList"}
        ],

        sortname: "id",
        sortorder: "asc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true
    });



</script>

<script language="JavaScript" src="/quanliadmin/docroot/js/system/payType.js?v=20140707" type="text/javascript"></script>

</body>
</html>